package com.dyj.common.client;

import com.dtflys.forest.annotation.BaseRequest;
import com.dtflys.forest.annotation.Body;
import com.dtflys.forest.annotation.Post;
import com.dyj.common.domain.vo.AccessTikTokTokenVo;
import com.dyj.common.interceptor.NoTokenInterceptor;

@BaseRequest(baseURL = "${tikTokDomain}",interceptor = NoTokenInterceptor.class)
public interface TikTokAuthClient {

    /** 获取accessToken */
    @Post(value = "${tikTokOauthAccessToken}")
    AccessTikTokTokenVo getAccessToken(@Body("client_key") String clientKey, @Body("client_secret") String clientSecret, @Body("code") String code, @Body("grant_type") String grantType, @Body("redirect_uri") String redirectUri);

    /** 刷新accessToken */
    @Post(value = "${tikTokOauthAccessToken}")
    AccessTikTokTokenVo refreshToken(@Body("client_key") String clientKey, @Body("client_secret") String clientSecret, @Body("grant_type") String grantType, @Body("refresh_token") String refreshToken);
}
